package com.example.repository;

import com.example.domain.Teacher;
import com.example.domain.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface TeacherRepository extends PagingAndSortingRepository<Teacher, Integer> {
    Optional<Teacher> findByAccountAndPassword(String account, String password);
    
    Page<Teacher> findAllByType(int type, Pageable pageable);
}
